package jobflow.scheduleBean;

import java.util.HashMap;
import java.util.Map;

import javax.faces.event.ActionEvent;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.web.RequestParameter;

@Name("tabsBean")
@Scope(ScopeType.PAGE)
public class TabsBean {

	private Map<String, Boolean> tabsMap;
	@RequestParameter
	private Boolean value=true;

	@Create
	public void create() {
		tabsMap=new HashMap<String, Boolean>();
		tabsMap.put("tab1", true);
		tabsMap.put("tab2", true);
		tabsMap.put("tab3", true);
	}

	public void remove(ActionEvent event) {
		String id = event.getComponent().getId();
		tabsMap.put(id, value);
	}

	public TabsBean() {
	}


	public void setValue(Boolean value) {
		this.value = value;
	}

	public Boolean getValue() {
		return value;
	}

	public void setTabsMap(Map<String, Boolean> tabsMap) {
		this.tabsMap = tabsMap;
	}

	public Map<String, Boolean> getTabsMap() {
		return tabsMap;
	}

}
